/** */

<template>
  <Input v-model="innerModel" :allow-clear="true" />
</template>

<script>
import { Input } from 'ant-design-vue'

export default {
  name: 'inputTest2',
  components: {
    Input,
  },
  model: {
    prop: 'value',
    event: 'change',
  },
  props: {
    value: [String, Number],
  },
  watch: {
    value: {
      immediate: true,
      handler: function (newValue, oldValue) {
        this.innerModel = newValue
      },
    },
    innerModel: {
      handler: function (newValue, oldValue) {
        this.$emit('change', newValue)
      },
    },
  },

  data() {
    return {
      innerModel: undefined,
    }
  },
  methods: {},
}
</script>

<style></style>
